import 'package:auto_route/auto_route.dart';
import 'package:distribution_mall_flutter/constant/cf_constant.dart';
import 'package:distribution_mall_flutter/constant/constant.dart';
import 'package:distribution_mall_flutter/constant/status_constant.dart';
import 'package:distribution_mall_flutter/entity/order/detail/order_detail_entity.dart';
import 'package:distribution_mall_flutter/generated/l10n.dart';
import 'package:distribution_mall_flutter/pages/order/order_detail/application/order_detail_service.dart';
import 'package:distribution_mall_flutter/pages/order/widgets/address_card.dart';
import 'package:distribution_mall_flutter/pages/order/widgets/goods_card.dart';
import 'package:distribution_mall_flutter/pages/order/widgets/order_footer.dart';
import 'package:distribution_mall_flutter/pages/order/widgets/order_num.dart';
import 'package:distribution_mall_flutter/pages/order/widgets/pay_cart.dart';
import 'package:distribution_mall_flutter/pages/order/widgets/summary_card.dart';
import 'package:distribution_mall_flutter/provider/order/order_detail.dart';
import 'package:distribution_mall_flutter/router/route_utils.dart';
import 'package:distribution_mall_flutter/router/router.gr.dart';
import 'package:distribution_mall_flutter/utils/common_widget.dart';
import 'package:distribution_mall_flutter/widgets/icon_button.dart';
import 'package:distribution_mall_flutter/widgets/shimmer.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:webview_flutter/webview_flutter.dart';

@RoutePage()
class ServicePage extends ConsumerStatefulWidget {
  final WebViewController? webViewController;
  const ServicePage({super.key, this.webViewController});

  @override
  ConsumerState createState() => _ServicePage();
}

class _ServicePage extends ConsumerState<ServicePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: const Color.fromRGBO(242, 243, 246, 1),
        appBar: AppBar(
          leading: CommonBtnWidget.arrowBack(
            onPressed: () {
              RouteUtils.back();
            },
          ),
          actions: [
            EPIconButton(
              width: 40,
              height: 40,
              onPressed: () {
                appRouter.replace(const AfterSaleRoute());
              },
              icon: const Icon(
                Icons.phone,
                size: 17,
                color: Color.fromRGBO(0, 0, 0, 0.9),
              ),
            )
          ],
          title: Text(S.current.service),
          centerTitle: true,
          titleSpacing: 0,
        ),
        body: WebViewWidget(controller: widget.webViewController!));
  }
}
